package com.hanserwei.han_picture.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hanserwei.han_picture.domain.entity.po.Picture;
import com.hanserwei.han_picture.domain.entity.po.User;
import com.hanserwei.han_picture.domain.entity.vo.*;
import com.hanserwei.han_picture.domain.request.picture.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface PictureService extends IService<Picture> {


    PictureStyleRegenTaskVO queryTaskStatus(String taskId);

    PictureStyleRegenVO generateImage(PictureStyleRegenRequest request);

    boolean deletePicture(long pictureId, User loginUser);

    boolean updatePicture(PictureUpdateRequest pictureUpdateRequest, User loginUser);

    Page<Picture> listPictureByPage(PictureQueryRequest pictureQueryRequest);

    void validPicture(Picture picture);

    Picture getPicture(PictureVO pictureVO);

    PictureVO getPictureVO(Picture picture);

    <T> PictureVO uploadPicture(T t, PictureUploadRequest pictureUploadRequest, User loginUser);

    boolean dePictureReview(PictureReviewRequest pictureReviewRequest, User loginUser);

    void fillReviewParams(Picture picture, User loginUser);

    PictureVO getPictureVOWithUserVO(Picture picture);

    Page<PictureVO> getPictureVOPage(Page<Picture> picturePage);

    Picture getPictureById(Long id);

    PictureVO getPictureVOById(Long id, User loginUser);

    boolean editPicture(PictureEditRequest pictureEditRequest, User loginUser);

    QueryWrapper<Picture> getQueryWrapper(PictureQueryRequest request);

    /**
     * 批量上传图片
     *
     * @param files              文件列表
     * @param batchUploadRequest 批量上传请求
     * @param loginUser          登录用户
     * @return 批量上传结果
     */
    PictureBatchUploadVO batchUploadPictures(MultipartFile[] files, PictureBatchUploadRequest batchUploadRequest, User loginUser);

    List<PictureVO> searchPictureByColor(Long spaceId, String PicColor, User loginUser);

    boolean editPictureByBatch(PictureEditByBatchRequest request, User loginUser);

    PictureTagCategory listPictureTagAndCategoryBySpaceId(Long spaceId, User loginUser);

    List<String> listAllTags();

    PictureReviewCountVO getPictureReviewCount();
}
